package com.ingesoft.client;

import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.IButton;

public class TablaSesion extends ListGrid {

	
	public TablaSesion()
	{
		super();
		
	}
	
	protected Canvas createRecordComponent(ListGridRecord record, Integer colnum)
	{
		String name=this.getFieldName(colnum);
		
	
		if(name.equals("btnSave"))
		{
			
			IButton btnSave=new IButton();
		    btnSave.setHeight(18);
		    btnSave.setWidth(65);
		    btnSave.setTitle("Guardar");
		    
		    
		    btnSave.addClickHandler(new ClickHandler() {
				
				@Override
				public void onClick(ClickEvent event) {
				
					
					SC.say("Hello");
					
				}
			});
		    
		    return btnSave;
		
	 }
		return null;
	}
}
